//
//  UIImageView+Cate.m
//  haiuser
//
//  Created by duomai on 14/12/19.
//  Copyright (c) 2014年 tiny. All rights reserved.
//

#import "UIImageView+Cate.h"

@implementation UIImageView (Cate)
//视图居中
- (void)changeToCenter{
    [self setContentScaleFactor:[[UIScreen mainScreen] scale]];
    self.contentMode =  UIViewContentModeScaleAspectFill;
    self.autoresizingMask = UIViewAutoresizingFlexibleHeight;
    self.clipsToBounds  = YES;
}
//视图圆形
- (void)changeToCircle{
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = self.bounds.size.width / 2;
}
@end
